﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - 仓储管理系统</title>
    <!-- 引入 Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- 引入 Bootstrap Icons（图标） -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
    <!-- 自定义站点样式 -->
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
</head>
<body>
    <div class="container-fluid p-0">
        <!-- 头部（固定） -->
        <header class="bg-white shadow-sm">
            <partial name="_Header" />
        </header>

        <!-- 侧边栏 + 主体内容（固定结构） -->
        <div class="d-flex">
            <!-- 左侧导航（固定） -->
            <partial name="_PartialSidebar" />

            <!-- 右侧动态内容容器：AJAX加载的内容将替换这里 -->
            <main id="mainContent" class="flex-grow-1 p-3">
                @RenderBody()
            </main>
        </div>
    </div>

    <!-- 右侧弹出的编辑模态框（全局唯一） -->
    <div class="modal right fade" id="editModal" tabindex="-1" aria-labelledby="editModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="editModalLabel">@ViewData["ModalTitle"]</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body" id="editModalBody">
                    <!-- 加载中提示 -->
                    <div class="text-center py-5">
                        <div class="spinner-border text-primary" role="status">
                            <span class="visually-hidden">加载中...</span>
                        </div>
                        <p class="mt-2">正在加载...</p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>

    <!-- 引入 axios（全局可用） -->
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>

    <!-- 引入 Vue 和 Element Plus（全局可用） -->
    <script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/element-plus/dist/index.full.js"></script>

    <script src="~/js/site.js" asp-append-version="true"></script>

    @RenderSection("Scripts", required: false)
</body>
</html>